package com.Object;

import com.sun.org.apache.bcel.internal.generic.NEW;

/**
 * @Author 小闽
 * @Date 2024/8/14 9:10
 * @PackageName: com.Object
 * @ClassName: Equals
 * @Description: 比较类
 * @Version 1.0
 */
public class Equals {
    public static void main(String[] args) {
        A a = new A();
        A b = a;
        A c = b;
        System.out.println(a == c);
        "hello".equals("abc");

        Integer integer1 = new Integer(1000);
        Integer integer2 = new Integer(1000);
        System.out.println(integer1 == integer2);
        System.out.println(integer1.equals(integer2));

        String str1 = new String("苏宁易购");
        String str2 = new String("苏宁易购");
        System.out.println(str1 == str2);
        System.out.println(str1.equals(str2));

    }
}

class A{

}
